#ifndef VROUTE_MACIO_DEFINES_HPP_3
#define VROUTE_MACIO_DEFINES_HPP_3
namespace vroute_stack
{
#define Interface class
#define CheckNeReturn(check, value, ret) if((check) != (value)) return (ret);
#define CheckEReturn(check, value, ret) if((check) == (value)) return (ret);
#define CheckNull(ptr, ret) if(nullptr == (ptr)) return (ret);
#define CheckNull1(ptr) if (nullptr == (ptr)) return;
#define CheckGReturn(val1, val2, ret) if((val1) > (val2)) return(ret);
#define CheckLReturn(val1, val2, ret) if((val1) < (val2)) return(ret);
#define CheckBetween(val, minv, maxv, ret) if(((val) > (minv)) && ((val) < (maxv))) return (ret);
#define CheckOutRange(val, minv, maxv, ret) if(((val) < (minv)) || ((val) > (maxv))) return (ret);
#define AttrSetGet(type, value) \
    void set##value(type tp) {value = tp;} \
    type get##value() {return value;}
}
#define ReleaseInsMaic(p) \
    if (nullptr != p) {\
    delete p;   \
    p = nullptr; \
    }
#define freeInsMaic(p) if(nullptr != (p)) {free(p);}
#endif //VROUTE_MACIO_DEFINES_HPP_3